package com.ruoyi.product.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.product.mapper.ProductDetailTypeMapper;
import com.ruoyi.product.domain.ProductDetailType;
import com.ruoyi.product.service.IProductDetailTypeService;

/**
 * 规格详情Service业务层处理
 * 
 * @author guoguoa
 * @date 2025-01-06
 */
@Service
public class ProductDetailTypeServiceImpl implements IProductDetailTypeService 
{
    @Autowired
    private ProductDetailTypeMapper productDetailTypeMapper;

    /**
     * 查询规格详情
     * 
     * @param id 规格详情主键
     * @return 规格详情
     */
    @Override
    public ProductDetailType selectProductDetailTypeById(Integer id)
    {
        return productDetailTypeMapper.selectProductDetailTypeById(id);
    }

    /**
     * 查询规格详情列表
     * 
     * @param productDetailType 规格详情
     * @return 规格详情
     */
    @Override
    public List<ProductDetailType> selectProductDetailTypeList(ProductDetailType productDetailType)
    {
        return productDetailTypeMapper.selectProductDetailTypeList(productDetailType);
    }

    /**
     * 新增规格详情
     * 
     * @param productDetailType 规格详情
     * @return 结果
     */
    @Override
    public int insertProductDetailType(ProductDetailType productDetailType)
    {
        return productDetailTypeMapper.insertProductDetailType(productDetailType);
    }

    /**
     * 修改规格详情
     * 
     * @param productDetailType 规格详情
     * @return 结果
     */
    @Override
    public int updateProductDetailType(ProductDetailType productDetailType)
    {
        return productDetailTypeMapper.updateProductDetailType(productDetailType);
    }

    /**
     * 批量删除规格详情
     * 
     * @param ids 需要删除的规格详情主键
     * @return 结果
     */
    @Override
    public int deleteProductDetailTypeByIds(Integer[] ids)
    {
        return productDetailTypeMapper.deleteProductDetailTypeByIds(ids);
    }

    /**
     * 删除规格详情信息
     * 
     * @param id 规格详情主键
     * @return 结果
     */
    @Override
    public int deleteProductDetailTypeById(Integer id)
    {
        return productDetailTypeMapper.deleteProductDetailTypeById(id);
    }
}
